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 / tilting object to speed with Physics

Author
Message
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 4th Feb 2009 22:05
Is it possible that when i add local force to an obejct, when it looses speed, it slowly tilts down? cause know, when i shoot an arrow in my little game, the arrow just stays straighton its x axis till it hits the ground, but i want it to come in teh ground like this: _\_ A bit tilted to the right. Is that possible?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Feb 2009 23:58
local mass should do the trick move it from the center to the front where the pointy bit is.



Dark Physics makes any hot drink go cold.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 5th Feb 2009 07:34 Edited at: 5th Feb 2009 07:46
and are those coordinates on his local axis(so z=100 is far frond, z=-100 is far back) or is it on the global axis?

[EDIT] nvm, i figured out

{EDIT} Well, another problem appears. The pointy thingy IS actually (0,0,0), so i can;t move it. But when i execute that command with 0,0,0 and i shoot the arrow up with its tail down, tha arrow falls down with its tail down. Maybe i should alter the mass
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Feb 2009 10:06
bobbel all object mass are set at 10,000 so changing the mass might work.

Now depending on which way you have made your arrow, all mass in an object is from its center, so by moving the local mass to the front of the arrow should make it heavier at the front.

Quick way to see what I mean is to make the arrow a sphere, change the mass position then fire it, should wobble.

Dark Physics makes any hot drink go cold.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 5th Feb 2009 15:25 Edited at: 5th Feb 2009 15:27
You know, i think i'll just post the code here, cause i think i'm just doing something wrong. Would someone please look at it and think about it? thanks!

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Feb 2009 16:05
PHY SET RIGID BODY MASS OFFSET LOCAL Pijl, 0, 0, -80

that will put the weight at the back of the object.

set object collision off Pijl+addon < can not be use in PhysX unless its a non physX object use one or all of the following
PHY GET COLLISION OBJECT A
PHY GET COLLISION OBJECT B
PHY GET COLLISION

rotate object Pijl,camera angle x(1),camera angle y(1),camera angle z(1) < again can not be done with phy object
use PHY SET RIGID BODY ROTATION ID, x#, y#, z#

or this move object Pijl, 20 < check out movement demo.

your doing well took me sometime to get thing going, post again for more help.

Dark Physics makes any hot drink go cold.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 5th Feb 2009 16:55
well, the things u can;t do with a phy obj, you see delete obejct rigid body, thats where i delete it from the phy list so i can position it right. then i do phy make object collision capsule to make it usable for phys again. And the part set obejct collision off thats were i place a fake object, so that doesn;t need phys
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Feb 2009 17:16
in the chm file it will show you how to shoot a sphere at a load if cubes, give that a read should help.

Dark Physics makes any hot drink go cold.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 20th Mar 2009 00:03
hi all, i know this may be a stupid question since nobody answerd this topic, i have a new example



no media
this is what i mean. when i shoot de box up, like this: |
the box comes down like this: |
i want it to go like this when i shoot it up: |/-\|
in the order of the dashes
i already tried mass offset, but it only wobbles when it hits the ground. so, any advice? thanks! i really need this..
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 20th Mar 2009 00:38 Edited at: 20th Mar 2009 00:42
change try these lines change the way the last two lines work, they now give -50 to +50 or -100 to +100




edit
helps if I read the question properly will post answer when I find it.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 20th Mar 2009 01:05
only thing I think of is, to make the arrow in two parts, with the front part being heavier than the back part.


<-front mass# of 50 ------ <<< back mass# of 10

Dark Physics makes any hot drink go cold.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 20th Mar 2009 08:39 Edited at: 20th Mar 2009 08:48
well i think the problem is that in real life, a arrow turns because it goes so fast the air-resistance forces it to turn to the direction its going. In dark physics, we don;t have air-resistance, so i think its nearly impossible to do something like this.

[edit]maybe i can use groups, lets try that
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 20th Mar 2009 13:56
say air made me think of forced fields put a small one on the front to push it down,worth trying.

Dark Physics makes any hot drink go cold.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 20th Mar 2009 19:03 Edited at: 21st Mar 2009 10:19
yes i thought of that also, but how? theres no way to do something like constraints in gmod. or maybe with joints or something...

[edit] fixed joints![/edit]
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Mar 2009 14:10
I solved it by having the physics object hidden (i just use a sphere, not an arrow shape that is). I then have a visible non physics model that i position to the physics objects x,y,z and rotate the visible model to the linear movement direction of the hidden physics object.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 22nd Mar 2009 14:54
can u post the code you used? that would really help me out
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Mar 2009 23:06 Edited at: 18th May 2009 13:35
Sure, i wrapped it in a demo program, hope it is useful for your implementation.



Regards

Login to post a reply

Server time is: 2024-04-18 14:56:44
Your offset time is: 2024-04-18 14:56:44