Simple Bounce

I am trying to make my ent bounce when colliding with something, i have tried different ways what i got atm is.

[lua]function ENT:PhysicsCollide(data,physobj)
vel = physobj:GetVelocity()
newvel = vel:Normalize() * -1
physobj:ApplyForceCenter( newvel )

But it is just not bouncing, or when i change the number multiplying vel:Normalize() it spazzes out on the floor moving left and right very fast.

I have tried using garrys method but it just makes it bounce to the left then roll along the floor


[lua]function ENT:PhysicsCollide(data, physobj)
local vel = data.OurOldVelocity
local norm = data.HitNormal
local ang = vel:Angle()
ang:RotateAroundAxis(norm, 180)
local newvel = ang:Forward()-1vel:Length()

Something like that.

Yee Know Tooooo Much

Did it work then?

ye and u reply too fast :stuck_out_tongue:

I replied in 9 minutes, that isn’t fast :v:

i mean the replies to these replies



I’m seeing double :(.

haha although one is more special than the other in more ways than one ^^

That made you sound really gay. I’m rating you gaybow.


Enjoy it.

the only one who enjoys gayboys o sorry gaybows is you ! :slight_smile: