Gravity to Velocity
Okay so I have a part of the trampoline code,
Code:
entity_get_vector(id, EV_VEC_velocity, velocity);Thanks all! :) (And yes this is the trampoline code from blockmaker, no I'm not going to release this in any way) |
Re: Gravity to Velocity
velocity[2] = 500 * user gravity
|
Re: Gravity to Velocity
Code:
GetUserGravity(id)Code:
velocity[2] = 500 * get_user_gravity(id); |
Re: Gravity to Velocity
Remove the 500. In theory the more gravity you have the higher the speed you jump with to achieve a static height.
If gravity is 800 you jump with the speed of 800 * x. If your gravity is 100 then youll jump with a vertical velocity of 100 * x. x here is a small number you can change (but 500 is too big). In theory this should work. Try removing the multiplication by 500 for now. |
Re: Gravity to Velocity
If I was to remove the 500, the trampoline wouldn't throw me at the 500 speed or whatever you want to call it, as the point of this isn't the gravity, it's a trampoline which throws you at 500 with normal 800 gravity, but if you were to hit it while you had gravity on, you would get thrown 500 speed upward and still have the gravity is what I wan't to do
Pretty much, x block is gravity .. if you touch this and jump off of it your gravity is set to 200 until you touch the floor, what I want to do is make it so if you touch the trampoline instead of the floor, it would throw you up x amount but still maintain that 200 gravity until you touch the floor |
Re: Gravity to Velocity
I dont understand... the gravity doesnt change during the jump. Do you want the trampoline to send you at a fixed height no matter what your gravity is?
|
Re: Gravity to Velocity
Quote:
|
Re: Gravity to Velocity
look into the gravity block code, and edit it so it wont reset the gravity when touching trampoline
|
| All times are GMT -4. The time now is 08:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.