Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

i need help with a godot code im doing

A topic by random guy on the internet created May 21, 2024 Views: 232 Replies: 4
Viewing posts 1 to 3

so im trying to code a bullet script using a rigid body 3D and its going good, but ive hit a wall and i cant figure out how to get past it

godot keeps on saying that the index "rotation" is invalid and on a null instance, idk what to do (im using 3D btw)

heres my code: 

extends RigidBody3D

func _physics_process(delta):

var impulse_strength = 100

var angle = $RigidBody3D.direction3D

$RigidBody3D.apply_central_impulse(Vector2(cos(angle), sin(angle)) * impulse_strength)

Deleted post

tried that, it says it has a problem with jt not following the vector3(float, float) signature

this doesn't look like the whole code, theres no index or rotation unless you did something to the 3D model in blender which would be the main problem because often I see people convert unsupported files into glTF and just assume it works.

im not using a blender model and this is the complete code 😭😭😭😭