effekseer / EffekseerForGodot3

MIT License
133 stars 9 forks source link

Position in 3D space is off #12

Closed MikeLundahl closed 1 year ago

MikeLundahl commented 2 years ago

Something seems wrong with positioning the Effekseeker node in 3D space (last tried in Godot 3.5.1). The Effekseeker node should be placed on exactly the same place as the red sphere on impact. But there seems to be an offset. The Effekseer node is also dragged with the camera as the player starts moving again (it doesn't stick to its position).

There's no documentation I can find that explains how Effekseer handles rendering and placement etc. in Godot. The Effekseeker node also seem to move to different location every time spawned.

My setup. I have a scene that includes the Effekseer node with a Spatial node as its parent.

I then spawn the VFX scene by adding the VFX scene to the main game scene and I set the positioning by setting the global_transform.origin where it should be.

Godot 3.5.1 Effekseer tool 1.70 Effekseer Plugin 1.70.1

https://user-images.githubusercontent.com/42893106/204132256-569d943f-d152-42df-a93d-cab998646946.mp4

ueshita commented 2 years ago

Could I get a minimal reproduction project? EffekseerEmitter node's 3D position works in my environment. The effect 3D position is calculated from the global_transform.origin of the EffekseerEmitter node.

MikeLundahl commented 2 years ago

Sure thing. here's a quick small project with the same problem... I discovered also that this problem happens when the camera moves. When not moving the camera the position for the FX is correct. I also placed a red sphere here to illustrate where the FX should be positioned.

When you run the game you can move the Player with the "arrow" keys. trigger the FX with "spacebar"

effekseer_test.zip

ueshita commented 1 year ago

Thanks! I reproduced it in my environment. We will now investigate the cause in detail.

ueshita commented 1 year ago

I found a simple bug in the plugin code. If the Camera node is a child of another moving node, the effect renders incorrectly.

This issue has already fixed. Please try latest release.

MikeLundahl commented 1 year ago

Just tried it... now it works! Fantastic! Thanks!