Raised This Month: $ Target: $400
 0% 

Solved Constrain prop height position


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-05-2020 , 21:55   Constrain prop height position
Reply With Quote #1



Hi,
So i try to fly this prop(the yellow object) in midair just a little above player head as shown in the pic.
I apply thrust F1 to push it upward to counter the gravity W1 and keep its height D1 static in midair. Its work.

The problem is when i decrease or increase the F1 value just a fraction to make it animating like it loosing and gaining its altitude(up and down), its start to bounce like Pong game and gradually accelerating non stop.

If anyone have any idea on how can i cancel or counter the velocity so it stop at desired altitude/height without Teleporting?

* I v turned alliedmodders page front to back searching for an answer.. now i m stuck.
* Or at least point me to the right direction or external link. One that without wind force in the equation.

sorry for the poor image editing

For the Loard in Haven, stop downloading the pictures.
They are the same as above.
A backup picture.
Attached Images
File Type: jpg forceup.jpg (71.7 KB, 59 views)
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 11-06-2020 at 12:02. Reason: Saying my prayer for those who downloaded the picture.
GsiX is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 11-06-2020 , 02:05   Re: Constrain prop height position
Reply With Quote #2

Show code.
__________________
Psyk0tik is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-06-2020 , 04:22   Re: Constrain prop height position
Reply With Quote #3

Hi there fine gentleman, good day to you handsome Sir.

There is no code.. i just attach "phys_thruster" to the object and tweak the force bit by bit until it stay in place. That the center line i desired D1.

Then if the object bounce away from the D1 line, i grab the distance value by how much and then multiply it with the F1 force. The further it travel the bigger the opposite value it gets. That cause the object accelerating further to the opposite direction and so on.

Roughly, this is what i v done before i give it up, code below is rewrite as proximation.

Spoiler


As said earlier, a simple if else statement wont fly this object.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 11-06-2020 at 04:35. Reason: editing so i can write a reason and make you read it.
GsiX is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-06-2020 , 12:02   Re: Constrain prop height position
Reply With Quote #4

**** momentum ****
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode