#Particle system unsyncs from parent object

1 messages · Page 1 of 1 (latest)

junior tundra
junior tundra
#

if you hit the upp arrow, it seems to shoot up for some reason as well?

junior tundra
#

Yeah, it's just kinda going crazy still. Not sure why this might be happening?

molten venture
#

Like just send a screenshot of it

junior tundra
#

yep, give me 1 sec

molten venture
#

That's pretty strange

#

Can you send your rocket script in here?

junior tundra
#
extends RigidBody2D

const ENGINE_FORCE = Vector2(0, -100000)
const BOOST_FORCE = Vector2(0, -50000)
const FIN_FORCE = 500000

var plume = null

func _ready() -> void:
    plume = get_node("./MainEnginePlume")

func _integrate_forces(state: PhysicsDirectBodyState2D) -> void:
    if Input.is_action_pressed("turn_left"):
        state.apply_torque(-FIN_FORCE)
    if Input.is_action_pressed("turn_right"):
        state.apply_torque(FIN_FORCE)
    if Input.is_action_pressed("cut_engine"):
        plume.emitting = false
    else:
        state.apply_central_force(ENGINE_FORCE.rotated(rotation))
        plume.emitting = true
    if Input.is_action_pressed("boost"):
        state.apply_central_force(BOOST_FORCE.rotated(rotation))
molten venture
junior tundra
#

ooooo thanks

#

potentially important piece of information: if i cut the engine, setting emitting to false, and then set it back to true, the problem seems to be fixed

molten venture
#

Sadly I'm not very experienced within the physics-simulation side of Godot, but I'll do my best here

#

Where on the rocket is the particle emitter situated?

junior tundra
molten venture
#

The desync also happens if you change directions and crash into stuff enough. Actually, it's there from the beginning. If I just keep going up, the particles eventually look like they're coming from the window. Do print statements for positions (both local and global) as well as roations for the rocket and the particle emitter to debug. That's all I say, sorry

junior tundra
#

thanks

#

the problem is not to do with the rotation, which is weird

molten venture
#

I have a suspicion that the torque and the particle emitter are not playing nice, might wanna debug that as well and play around with it

junior tundra