-
Posts
8 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Pfctink
-
-
Well, I have the line set in, but it's still not working. I can crouch, but I'm not able to go under any objects.
-
Seriously, I have the crouch "working", it's just I can't go under objects.
-
Script.crouch does not work.
-
I have been messing around with a script in the FPSplayer, trying to get crouching to work is hard. How would I go about being able to crouch under objects? I have my script here: http://pastebin.com/wxSsy1hP
-
How can I make a character crouch? I have it set up, but the problem is, the character's height is the same.
-
I found a crouch script on this forum, but you have you press C to toggle it on and off. If I could get a way to make it non-toggle, that would be good. I set the script to use Control though.
if window:KeyHit(Key.ControlKey) then
crouched = not crouched
end
self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , crouched, 1.0, 0.5, true)
if self.entity:GetCrouched() then
self.camera:SetPosition(self.entity:GetPosition()+Vec3(0,1,0))
else
self.camera:SetPosition(self.entity:GetPosition()+Vec3(0,2,0))
end
-- Needs to be KeyDown instead of KeyHit. I figured it out.
Crouch script?
in Programming
Posted
Now how would I be able to apply this to the FPSplayer prefab?