Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | noobie12347 |
I know it’s a very basic question but I really can’t find any documentation online that helps me (I don’t know if I’m just stupid and can’t find it)
When I try:
extends RigidBody
if translation(Vector3[1]) < -25:
translation(Vector3(0, 0.848, 0))
or
extends RigidBody
var num = translation(Vector3[1])
if num < -25:
translation(Vector3(0, 0.848, 0))
I have also tried swapping [1] for (y) but that doesn’t work either.
They give the error message: Parser Error: Error parsing expression, misplaced: Built-in Type
I don’t know if it’s just not the correct syntax or maybe you simply cant use it in an if statement.
Thanks!