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 / Bow and Arrow style help

Author
Message
HavokDelta6
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 25th Aug 2009 15:05
This is alittle out of my confort zone so i hope i get some help

using darkphysics how does one get a bow and arrow style, where the projectile "embedes" itself in the object its shot out.

if someone could build an example which just fires boxes that loge themselves in boxes
i'd be EXTREMLY apreciative.

~Havok

Oh i'll do it later -.-
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2009 02:19
You would need to detect the collision, collision point, and replace the object with a static one at the point of impact.

Even if it was possible using purely Dark Physics, it would be a waste of CPU time to have a dynamic object standing still for evermore. It would leave the main physics processing, but still be a small overhead.

Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 26th Aug 2009 04:33 Edited at: 26th Aug 2009 04:36
I made an example earlier on how to shoot arrows making them stick in a wall.
However the arrows left in the wall are not physics objects just any model resembling an arrow will do, i suspect you where thinking in lines of using physics objects but as BatVink states - it is a waste of resources.



Regards
HavokDelta6
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 26th Aug 2009 11:16
Not if you disable them after collision or remove them after a timeframe, anyway is it not posible in dark physics

even though the origonal Ageia engine supports it
The Havok physics engine supports it
and the algrox physics engine supports it

Oh i'll do it later -.-
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 26th Aug 2009 22:03 Edited at: 26th Aug 2009 22:04
Yeah it's possible, you can use "Phy Set Collision State ObjectID, 0" to turn off the physics collision after the arrow has hit an object and also stop the motion. It wont embed in the object as the collision will occur at the very edge but you could save the travel angle and move it manually afterwords to penetrate the target object.

However that is the easy part =).

Make that physics arrow fly with the spearhead facing in the direction of travel as there is no friction with air is another ballgame, continusly checking the angle and apply right angle force to the back end stabilizing it would work i suppose, but that would take even more resources.

Regards
HavokDelta6
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 27th Aug 2009 02:20
shame, thanks guys

Oh i'll do it later -.-
Monk
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 27th Aug 2009 16:41
Quote: "Make that physics arrow fly with the spearhead facing in the direction of travel as there is no friction with air is another ballgame, continusly checking the angle and apply right angle force to the back end stabilizing it would work i suppose, but that would take even more resources."


I don't know if this is possible in Dark Physics, but stable flight is when the centre of mass is well ahead of the centre of pressure.
For an arrow, this means that the feathers are well behind the middle of the arrow which causes stable straight flight. If you could mimic that, you wouldn't need to constantly adjust the forces.

Monk

I like work. It fascinates me. I sit and look at it for hours.
HavokDelta6
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 27th Aug 2009 20:03
The arrow was an example, but if you want to embedd it in an object, let darkphysics fly it, then just move it forward alittle, simple

btw, GUESS WHO'S OFF MODERATION QUE

me ^_^

Oh i'll do it later -.-
Monk
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 28th Aug 2009 09:42 Edited at: 28th Aug 2009 09:42
Quote: "The arrow was an example, but if you want to embedd it in an object, let darkphysics fly it, then just move it forward alittle, simple"


Yeah but if you want it to fly through paper, then you need to just decrease the velocity on collision, not just stop it. That will work for the tree as well.

Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 28th Aug 2009 10:14 Edited at: 28th Aug 2009 10:19
Quote: "I don't know if this is possible in Dark Physics, but stable flight is when the centre of mass is well ahead of the centre of pressure"


Unfortunately the Physx world is a vacuum so to speak. For example it does not matter if you drop an arrow on the moon with the tail first, it will fall with the tail first indefinitely.
Center gravity only affects the arrow when it hits the ground, it will sort of roll on it's tip.

Regards

Login to post a reply

Server time is: 2024-11-24 17:30:09
Your offset time is: 2024-11-24 17:30:09