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.

Newcomers DBPro Corner / Angling Objects Dynamically

Author
Message
Ordos0
21
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 3rd Feb 2003 19:39
I have a boat that the user controls on a matrix that dynamically randomizes (for the waves). How would I make the boat angle and pitch itself so that it is parallel to the matrix below it at all times?
CarlTaylor
21
Years of Service
User Offline
Joined: 13th Jan 2003
Location: United States
Posted: 3rd Feb 2003 20:11
i suggest making it simple. Have maybe four points on your boat (front left, front right, back left, back right) and have the program check the matrix height at those four points and write some sort of equasion to find the boats pitch, maybe through finding the slope of a tangent line between the points.

good luck!

baseball = life
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 3rd Feb 2003 22:16
I have no idea how they did it, but in the "jetski" example in DB regular, there was a jetski that bobbed in angular coordination with the waves. Used a few sin and cos commands though, I'm sorry to say. Good luck with that.
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 4th Feb 2003 02:49
It wasn't in full 3D angular movement, actually. I seem to recall that the jetski tested a point in front of it and a point behind it; it then determined an appropriate angle to be at and interpolated it over time for smooth movement. In essence, the jetski never tilted sideways - just backwards and forwards.

Perhaps the tank demo would be more handy; although, it is a little complicated at first. If you can't get your head round what it does, come back here and we'll see if we can help.

"I am a living, thinking entity who was created in the sea of information."

Login to post a reply

Server time is: 2024-11-23 23:31:09
Your offset time is: 2024-11-23 23:31:09