Skip to content

Which is better

Which is better

Rigidbody.addforce(transform.forward)

Rigidbodh.addrelativeforce

This ia to control fps

0 points1 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 50% up
Kind
Text
ID
i88ujv

2 comments

They do the same thing in a different way, its in the name.

Addforce(up) would add a force in the up direction of the world where as addrelativeforce(up) would add force in the up direction of the object your adding the force to (ie if the player was laying down it would move accross the floor in the direction its head is pointing.

Using addforce(transform.up) would be the same as addrelativeforce(vector3.up)

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.