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.

AppGameKit Classic Chat / Best way to get a 3D Physics object's current falling speed?

Author
Message
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 1st Nov 2015 21:14
Hi all,

If I make a block fall in my game, I want to know when it rests, after hitting other objects and such. Is there a good way for this, other than checking the current Y position against the previous? My best solution so far is checking to make sure the difference between the current Y value and the last frame's Y value is equal to 0.0.

It would be great if we had access to something like GetObjectSpeed(objId) or something similar.
Senior Software Engineer - RotoGrinders
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 2nd Nov 2015 02:18
@Stab in the Dark Software

Thanks for that! I even looked at that command a few weeks back and didn't make the mental connection I need. This should save me a lot of headache
Senior Software Engineer - RotoGrinders
haliop_New
User Banned
Posted: 2nd Nov 2015 05:00
just cruise through all 3d commands... there aren't as many as needed but by reading you'll get what you can do with them I always open another window for google cause some words I don't know ...

Login to post a reply

Server time is: 2024-11-17 00:14:44
Your offset time is: 2024-11-17 00:14:44