Jump to content


Photo

Control over the physics simulator


  • Please log in to reply
4 replies to this topic

#1 Syynth

Syynth

    GMC Member

  • GMC Member
  • 434 posts
  • Version:GM:Studio

Posted 03 April 2012 - 03:57 AM

I have several questions regarding functionality of the new physics included with GMS and I have been unable to find any information that I find more helpful than even just the documentation.

But first, as my understanding has it, one must create a fixture with physics_create_fixture(), modify it's properties to your needs, and then bind it to the object. Now your object can be moved around with physics_apply_force(), etc. functions.

I understand that much, but as I've tried to get deeper into manipulating the objects, I am struggling to understand how to control them with any real accuracy or fine control.

For instance, if I have a moving object, and I want to stop this object, I would think I must apply a force/impulse equal to the opposite of it's velocity. As far as I can see, I don't see any way to even view the properties contained within an object's fixture. Is this possible? Can I remove an object's fixture, and thus stop simulating it (or is there any capability to otherwise edit fixtures after being bound to an object)?

I haven't used any physics engines before (with the exception of NVidia's PhysX included with Unity, which easily exposes much of the functionality I asked about), so I can't say I know whether these things are already available to me, or if they need to be included in future updates, or if this is all of the physics support we will be getting. So I guess my question boils down to, what about all that stuff? :whistle:
  • 0

#2 JumpMan16

JumpMan16

    GMC Member

  • GMC Member
  • 219 posts
  • Version:GM:Studio

Posted 04 April 2012 - 01:15 PM

Check this topic.
  • 0

#3 Syynth

Syynth

    GMC Member

  • GMC Member
  • 434 posts
  • Version:GM:Studio

Posted 04 April 2012 - 09:14 PM

Oh wow! I had not seen the phy_* variables before. I guess the only thing I am still unsure of or unaware of is a little detail about exactly how fixtures work. If I attach a fixture to something, what happens when I attach a second fixture to it? Does it replace the first one? Do they coexist? If it replaces the first one, I guess that might be sufficient for my needs, but I could desperately use the ability to remove fixtures from objects to stop simulating them. Thanks for the help, by the way!
  • 0

#4 Thaudal

Thaudal

    GMC Member

  • GMC Member
  • 242 posts
  • Version:GM:Studio

Posted 14 April 2012 - 01:33 PM

Oh wow! I had not seen the phy_* variables before. I guess the only thing I am still unsure of or unaware of is a little detail about exactly how fixtures work. If I attach a fixture to something, what happens when I attach a second fixture to it? Does it replace the first one? Do they coexist? If it replaces the first one, I guess that might be sufficient for my needs, but I could desperately use the ability to remove fixtures from objects to stop simulating them. Thanks for the help, by the way!


I'd really like to know this as well.
  • 0

#5 lballaty

lballaty

    GMC Member

  • New Member
  • 83 posts

Posted 19 July 2012 - 01:12 PM

There is the physics_fixture_set_kinematic(fixture), that might do enough for you ...
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users