Hey, I tried to add a rotating wheel to my ent but I can't get it to stay alligned when I move the parent ent. Does anybody know how to fix this?
Thank you
https://files.facepunch.com/forum/upload/300107/27cdd154-624e-4023-be09-2dbef6b9e430/7.gif
Can't help if you don't show up how you rotate it.
I use this to create it initially
wheel = ents.Create( "prop_dynamic" )
wheel:SetModel( "models/props_c17/pulleywheels_small01.mdl" )
wheel:SetPos( self:GetPos() + ( self:GetAngles():Forward() * 0) + ( self:GetAngles():Up() * 0 ) + (self:GetAngles():Right() * 11))
wheel:SetAngles(self:GetAngles())
wheel:SetParent( self )
wheel:SetColor( Color(150,150,150) )
wheelA = wheel:GetAngles()
wheelA:RotateAroundAxis(self:GetAngles():Up(), -90)
wheel:SetAngles(wheelA)
self:DeleteOnRemove( wheel )
wheel:Spawn()
And this to rotate it
hook.Add("Think",'WheelSpin', function()
wheelA:RotateAroundAxis(wheel:GetAngles():Forward(), 1)
wheel:SetAngles(wheelA)
end)
Sorry, you need to Log In to post a reply to this thread.