Version: 1.36.2.0
Frequency: Consistently
Severity: Blocker
Context: in a WASM module, after injecting a particle at a lat/lon in the world
Bug description: The following Exception gets thrown when trying to relocate an effect that is far away (possibly when the distance exceeds MaxDistanceEmission):
Exception thrown at 0x00007FF6463CA103 in FlightSimulator.exe: 0xC0000005: Access violation writing location 0x0000000000000070.
Repro steps:
- Inject an effect using
id = fsVfxSpawnInWorld
- Relocate to another airport using Dev Mode
- Call
fsVfxSetWorldPosition(id...)
to relocate the effect
Interestingly enough, when I call fsVfxSetRotation
I don’t get an exception.
Hello @runshotgun
Thank you for reporting the problem, this should not trigger an exception obviously.
For now, fsVfxSpawnInWorld and fsVfxSetWorldPosition will only work if you are in the range defined by the “MaxDistanceEmission” of the emitter.
Effects will be despawned outside that range.
We will clarify this in the documentation and fix the exception.
Regards,
Sylvain
That’s the temporary fix I found yea. Thanks for looking into this!
Merci!
I assume the function will return false if the effect is no longer available?
Hello @runshotgun
A fix has been made in SU15 to address this.
You can check it in the flighting version that is available now.
Regards,
Sylvain
1 Like
Thank you I’ll give it a go!