Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP/(possibly)DBC] Something that reads the height at the x position of a rotated box

Author
Message
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 24th Nov 2007 05:43


Ok, so what this does is takes the x position of the box, and translates that into the y position of the rotated box (depending on the rotated boxes parameters.

It still has bugs, such as the fact that getting to close to the edge cause a strange glitch, but it should work ok.

alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 24th Nov 2007 05:51
No offense, but this has the practical usage of a glass brick to an author, and the intruige integrity of a dead rabbit that is being eaten by maggots. Why do you keep posting these snippets?

aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 24th Nov 2007 06:12
is it ok if I ignore that comment. You have to think about how it might be useful. Let's get a second opinion

alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 24th Nov 2007 13:03
Hey! Thats almost useful; just need to get rid of that bug!

Your signature has been erased by a mod - image max size is 600x120
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 24th Nov 2007 15:09
Please convert your sqrt distance formulas to vector ones

And i can imagine some ways how this can be useful


Click For Details!

aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 24th Nov 2007 15:59 Edited at: 24th Nov 2007 17:44
thx

ps. How do you do vector thingies?

alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 24th Nov 2007 16:25
Note: I'm working on a version where you simply specify all 4 corners of the box and it works.

alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 24th Nov 2007 20:56
Quote: "ps. How do you do vector thingies?"


Type "Distance" in search box. Most of the threads has the sqrt distance formula.. But there is lot of threads with has the vector way and its faster!


Click For Details!

aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 24th Nov 2007 23:20
i might implement this, but as I don't understand how it works...


alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 25th Nov 2007 01:25
v=make vector2(1)
set vector2 1,xdistance#,ydistance#
d#=length vector2(1)
v=delete vector2(1)

Your signature has been erased by a mod - image max size is 600x120
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 25th Nov 2007 05:01
or for 3d distances..




Click For Details!

aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 25th Nov 2007 22:21 Edited at: 25th Nov 2007 22:29
I found that, but would like an explanation. I hate copy pasting code...

EDIT: I figure out how it worked! I'll be implementing it in the next update.

alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world

Login to post a reply

Server time is: 2024-11-22 13:04:06
Your offset time is: 2024-11-22 13:04:06