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.

Dark Physics & Dark A.I. & Dark Dynamix / How to make an object bounce and return to its original position?

Author
Message
DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 25th Nov 2009 20:54
hello everyone, I'm currently working on a project, where a small box is positioned in front of a vehicle. My goal is to "shoot" out this box, have it reach a specific distance each time its shot out, and have it return to the front of the vehicle each time.


how would i go about achieving this? I'm using Visual C++(express) with gdk. any help would be appreciated, thank you.
DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 26th Nov 2009 08:41
is there any further explanation needed so someone can help with this?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Nov 2009 11:22
sound like a non physX ideal, meaning could you do this in the read world?

Anyhow try looking up one of these.



Dark Physics makes any hot drink go cold.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 26th Nov 2009 11:57
An observation:
Need to take care when repositioning physics objects like this, both kinematic and normal dynamics.
Imagine you have several vehicles that are all physic objects themselves. And your vehicles shoots the box forward, then another vehicles moves in front of your's during the time the box is "away". What happens when you then reposition the box back to the front of your vehicle is that the the box will intersect the other vehicle and the result will be unpredictable. The other vehicle will shoot away at incredible speeds due to the sudden penetration of its surface. It would be like your box is moving at thousands of miles/hour and hitting.

Regards
DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 26th Nov 2009 21:20
would I need to have a physics engine installed to execute those commands, howdo? and no this method won't be used for the real world. simply simulation.
DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 28th Nov 2009 01:38
anyone else with any suggestions?
DrReaper
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 4th Dec 2009 17:11
Try adding velocity to the object. That should get the object moving. Then you can check it for collision with other objects. At some point I would think it would hit the ground. Then you could either delete the original and make a new one back where it started. If this is going to be somehow connected to the car its going to a bit harder as the car may be moving. In that case you may want to make a ragdoll out of the "rope", "chain", or what ever is connecting it. I think it can be done.
DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 5th Dec 2009 01:18
how do I add velocity? not really all that familiar with the commands. here is a code i have so far, that i got from this thread(http://forum.thegamecreators.com/?m=forum_view&t=89539&b=1)

demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 5th Dec 2009 20:40
I'm sorry for the off-topic post, I just wanted to say, DarkwingDuck, I love your name.

DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 9th Dec 2009 05:16
thanks. now help!

Login to post a reply

Server time is: 2024-04-27 03:23:32
Your offset time is: 2024-04-27 03:23:32