Jump to content

disable gravity for select objects


xtreampb
 Share

Recommended Posts

Is there a way lua, C++ or both to still have gravity turned on for some objects and off for others? Would I need to create another world and have the entities that aren't affected by gravity assigned to this world? Can I even draw two worlds to the camera. I don't see why not just some meticulous management of objects.

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

Set gravity mode would probably work if it didn't need to be a character controller.

SetGravityMode() works on character controllers as well, its just that SetInput() wont easily be able to control well once off the ground (thinking of the jump aspect). But at that point, you could switch the controls to more of a spectator cam.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

I have a sphere brush object that I am using needs to use entity navigation (be a character controller) but also needs to float. When i set gravity mode to false, it hovers but it doesn't move. When gravity mode is default, it falls to the floor but then navigates.

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

You would need to use add force to use physics to push your controller where you want. I'll have a go at adding a jetpack to the default fps controller tomorrow.

 

---Edit--

 

So it seems that with the 'Character Physics' mode Leadwerks applies different rules to the entity. Thusly this means that you can not reliably nullify the falling of the Character controller with proper math.

 

I'm still working on getting the Jetpack to work no matter the mass or gravity with the character controller. Cross your fingers.

Edited by Einlander
  • Upvote 2
Link to comment
Share on other sites

I have a sphere brush object that I am using needs to use entity navigation (be a character controller) but also needs to float. When i set gravity mode to false, it hovers but it doesn't move. When gravity mode is default, it falls to the floor but then navigates.

 

You also have the choice of adding the script to a pivot, and the sphere to the pivot at the height you want. This will let it appear as if it's floating while the character controller is actually on the ground.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...