Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Moving a RigidBody at a constant speed
k0fe
Jun 23rd, 2019
134
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C#
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
maxSpeed
:
float
=
10.0
;
accel
:
float
=
3.0
;
function FixedUpdate
(
)
{
if
(
rigidbody
.
velocity
.
magnitude
<=
maxSpeed
)
rigidbody
.
AddRelativeForce
(
Vector3
.
forward
*
accel
)
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
This month smells like money
CSS | 44 min ago | 1.04 KB
✅ API Flaw Money Method
CSS | 45 min ago | 1.04 KB
⭐ Exploit Documentation ⭐
CSS | 47 min ago | 1.04 KB
z66is_archive.zip.txt
12 hours ago | 1,016.35 KB
the number
12 hours ago | 0.01 KB
Untitled
22 hours ago | 0.59 KB
Untitled
22 hours ago | 0.45 KB
Untitled
22 hours ago | 0.37 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!