Not logged inOpenClonk Forum
Up Topic General / Help and Questions / Enhancing CreateParticleAtBone()
- - By Pyrit Date 2016-04-06 00:10 Edited 2016-04-10 12:17
I like to use CreateParticleAtBone(), because it is very useful for creating particles at on moving or animated meshes.

I have some suggestions on how to make it better, because I ran into a few problems:

1. The placing/offset of the particles seems to be in pixels. It would be better, if a value of 1000 would correspond to 1 pixel, like it is with attaching meshes. You could place particles more precisely.

2. How creating particles for attached meshes could be handled: Imagine a torch, that creates fire particles on the tip. Now a clonk holds the torch. The torch itself is contained in the clonk. But the mesh of the torch is copied into the clonk's hand, so that it appears like if he is holding the torch. The particles that are created by the torch with CreateParticleAtBone() could also be moved to that mesh of the torch that is attached to the clonk.

3. Another thing I noticed: PV_MoveRelative moves the particle relative to the object wich created the particle, but not relative to the bone, from where it was created. As a result, particles don't really stick to animated bones, they are anywhere expect where they should be (CPAB had the purpose to synch particles with bones, so this might be an error)

Thoughts? :)
Parent - - By Isilkor Date 2016-04-06 00:25
(I'm assuming you're talking about CreateParticleAtBone)

> 1. The placing/offset of the particles seems to be in pixels. It would be better, if a value of 1000 would correspond to 1 pixel, like it is with attaching meshes. You could place particles more precisely.


I'm fairly sure this is an oversight. Right now, you can work around the precision limitation by doing sub-pixel translations via MeshTransformation on the object, then creating the particle, then reverting the transformation to its original state, but obviously that's not a desirable solution.

> 2. [...]


It should be easy to make CPAB work with attached meshes. If you want to file a feature request or bug me on IRC tomorrow in the evening I'll look into it.
Reply
Parent - By Marky [de] Date 2016-04-06 04:33
Parent - By Pyrit Date 2016-04-10 12:04
Yes, I meant CreateParticleAtBone!
Up Topic General / Help and Questions / Enhancing CreateParticleAtBone()

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill