xtreampb Posted January 29, 2016 Share Posted January 29, 2016 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. Quote 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 More sharing options...
CrazyM Posted January 29, 2016 Share Posted January 29, 2016 Is this what you're looking for? http://www.leadwerks.com/werkspace/page/documentation/_/entity/entitysetmass-r74 Quote CrazyMinnowStudio.com Youtube, Twitter, Facebook, G+ Link to comment Share on other sites More sharing options...
macklebee Posted January 29, 2016 Share Posted January 29, 2016 I think you are looking for Entity:SetGravityMode() 1 Quote 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 More sharing options...
Einlander Posted February 4, 2016 Share Posted February 4, 2016 Does this help? http://www.leadwerks.com/werkspace/topic/13488-simple-per-entity-no-gravity Quote Link to comment Share on other sites More sharing options...
xtreampb Posted February 9, 2016 Author Share Posted February 9, 2016 Set gravity mode would probably work if it didn't need to be a character controller. Quote 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 More sharing options...
macklebee Posted February 9, 2016 Share Posted February 9, 2016 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. Quote 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 More sharing options...
xtreampb Posted February 9, 2016 Author Share Posted February 9, 2016 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. Quote 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 More sharing options...
Brutile Posted February 9, 2016 Share Posted February 9, 2016 I'm not sure how well this would work with physics and collision, but you could probably get away with using Move, Translate, or just SetPosition Quote Link to comment Share on other sites More sharing options...
Einlander Posted February 14, 2016 Share Posted February 14, 2016 (edited) 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 February 15, 2016 by Einlander 2 Quote Link to comment Share on other sites More sharing options...
Einlander Posted February 15, 2016 Share Posted February 15, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.