question about TFormPoint in iminib3d

BlitzMax Forums/MiniB3D Module/question about TFormPoint in iminib3d

jhocking(Posted 2010) [#1]
How do you tell this command to use the global coordinate space? In Blitz3D you used the parameter 0 for that, but I can't tell if that's legal for the command in iminib3d. I mean, this line in my code doesn't throw up a compiler error, but it may still be a semantic error:
Entity::TFormPoint(0, 0, 2, attacker, 0);


The reason I ask is that I'm definitely not seeing the correct behavior here, and I want to check if the problem is because I'm passing bad parameters to the function, or if there's a bug in the function itself.


For reference, what I'm trying to do is have the recipient of an attack knocked away from the attacker regardless of which way the recipient is facing. The line immediately after that one is:
visual->PositionEntity(Entity::TFormedX(), Entity::TFormedY(), Entity::TFormedZ());


Right now there are four possible combinations of attacker/recipient, and three combinations work, but for some reason the fourth doesn't. The fact that goblin to gnome, gnome to goblin, and goblin to dwarf all work fine makes me think I simply coded dwarf to goblin incorrectly, but an output statement immediately before TFormPoint shows the correct facing:
NSLog(@"%f", attacker->EntityYaw());


What's happening is that the goblin is being knocked in the global positive Z direction no matter which way the dwarf is facing.


ADDITION: I just checked by putting in another entity as the last parameter and it's still not behaving correctly. I haven't tested enough yet to be sure this is a bug in iminib3d, but it sure looks like one.

I can probably figure out some work-around to achieve the desired end effect, but I sure would have preferred to just use TFormPoint rather than having to position a temporary pivot.


ADDITION2: Come to think of it, I need to do this with the work-around approach anyway because using TFormPoint the way I was using it assumed that the attacker is always facing the direction of the attack, which isn't the case.

So in this specific situation where I discovered the bug it doesn't matter to me if the bug is fixed, just pointing out something you may want to look at for the next version.


simonh(Posted 2010) [#2]
You can use 0 or NULL for the global space. Would be surprised if this was a bug, but will check it out.