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.

Author
Message
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 22nd Nov 2003 22:00
Some of you know already about the "Return to the Matrix"(Now "Ones and Zeros". I am trying to get the player to be able to run up walls. What I did so far is tell the computer whether the player is on the ground or on a wall.

I'm trying to get the player to rotate 90* around its X-axis, and that works. But then I try to rotate it around its Y-axis, just as if it were on the ground, but for some reason, either the camera doesn't stay in 3rd person or the object doesn't rotate properly.

How do I get the object to Rotate on its Y-axis when perpindicular to the building?
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 22nd Nov 2003 22:10
Did you try the "Turn Object" commands for rotating your player left/right when they're facing any direction?

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 22nd Nov 2003 22:13
LOLOL, no I didn't!!Lol, I really don't know why I didn't even think about that seeing as how I used it in other places,lol. Geezelaweezenomanopeez, how dumb can I be!?
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 22nd Nov 2003 22:45
I know I'm asking for alot here, but is there away to make an object perfectly pepindicular to the building? That way, when its walking, the player won't walk through the building.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 22nd Nov 2003 22:59
You could use a collision system to prevent you from going through the wall. Or, you could find the normal of the wall and align your player to that normal so he'd be very precisely aligned with the wall. Or, you could use a combination of both to prevent slight math errors from walking you through the wall and to get the best perpendicular angles you can get.

The upcoming release of the DLL has a vector-2-angle converter that was made as a solution to align bullet holes to collision normals. It could probably be very beneficial in this case too.

Sorry though, don't have an answer in DBPro code only.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 24th Nov 2003 00:37
Actually, can you explain the 'normal' a bit more to me? I've still been trying to get the player perpindicular, but with no succes.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 24th Nov 2003 00:54
Sure thing.

Imagine a triangle in a 3D world. The "normal" of the triangle would be a 3D line (with a length of 1) sticking straight out from the face of the triangle regardless of where the triangle is facing. (IE: It is a line that's exactly perpendicular to the triangle)

So getting the normal of the surface you're impacting and aligning your object to the normal would most likely be the best way of handling it.

The upcoming ray-cast function will return the normal of the surface the ray intersected and does have alignment code to properly rotate decals, etc... to the normal. If I'm right, there would still be a free rotation axis once the object was rotated into a perpendicular position. It would be that left/right turn you want when you're perpendicular with the wall.

In all truth, a normal does not have to be associated with a triangle. It's just a 3D line with a length of 1. So, a person could have a "movement normal" that pointed in the direction of the movement of the player, etc...

That help?

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 24th Nov 2003 01:05
Hmm, yes, I think I understand. I think I know what they look like becuase I've seen them in modeling programs, but how do you activate it. What are the commands? Can you make me a quick demo, or explain it another way? lol, sorry.
feiting
22
Years of Service
User Offline
Joined: 19th Oct 2003
Location:
Posted: 24th Nov 2003 01:14 Edited at: 24th Nov 2003 01:16
my new game... when I get a brace for typing, will use an engine that does that.

Basically, I will use roll and turn object commands. But I will have 3 sets of input. One for each axis. If gravity goes -y, then this, if +x then that... if -z... etc. The input loop will be fairly large.

He who does not take the assassin job, will get killed by one who does.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 24th Nov 2003 01:19 Edited at: 24th Nov 2003 01:20
There's no automatic way to get the normal of a surface in DB that I am aware of. Usually you have to mathematically figure it out.

Probably the best way to get the normal of a surface is to find 2 lines that run along the surface. Then you have to take the cross-product of those lines to get a vector pointing out from the surface. Then you have to normalize that vector to get your surface normal. Then you'd have to figure out how to align your object to that normal.

Then it's a series of angle calculations etc...

Pretty in-depth and mostly useless if you don't have the two lines running along the face of the surface for the first part.

That's much of what makes the DLL commands useful is that they give you what you want without throwing you through a bunch of loops first

It's scheduled to release no later than this upcoming Friday.

Sorry for the probs you're having.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 24th Nov 2003 01:47
lol,thanks anyways. feiting, I can't understand what your saying, but I think I have an idea...
feiting
22
Years of Service
User Offline
Joined: 19th Oct 2003
Location:
Posted: 24th Nov 2003 02:31
6 sets actually. normally gravity is negative y. (-y). there's an x y and z axis. I need a pic or a demo. I just moved my position, I think I'll write the engine now.

He who does not take the assassin job, will get killed by one who does.
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 24th Nov 2003 02:59
Yessss,Muuahaha, I figured it out(well, me and my dad). We sat down and with a pen and paper began to think.

Ill explain it tomarrow as I'm abit sleepy. See you then...

Login to post a reply

Server time is: 2026-07-26 19:46:56
Your offset time is: 2026-07-26 19:46:56