Topic: Projectile Offset Issue
Im currently creating sprite for the fireballs for the game.....
when i add the projectile, they always fire from the same physical point in the scene.
Here are my settings
Universal Fighting Engine Forum Universal Fighting Engine (UFE), a fighting game toolkit for Unity 3D |
You are not logged in. Please login or register.
Universal Fighting Engine Forum → UFE 1 (Deprecated) → Projectile Offset Issue
Im currently creating sprite for the fireballs for the game.....
when i add the projectile, they always fire from the same physical point in the scene.
Here are my settings
Ah, I think I figured this out. Do you have your Right Hand assigned in your hitbox set up? The projectile is trying to instantiate from the right hand, but if no right hand has been assigned then it will default to world 0 on instantiating. I just tested my projectile by assigning to Custom 7 which isn't assigned to anything and got the same results in your video.
Since you have two heights of fireballs, my guess is the yellow one isn't a prefab at world 0? Check all child objects of your prefab.
another issue...
ha..... getting there.... when i jump tyo the other side of the opponent the fireballs are backwards... they are not mirroring..
another amazing video:
http://youtu.be/FfX2N9EFwq0
That is correct, projectiles do not mirror.
Test your projectile in Scene view by dragging it around:
If trail follows behind it correctly, then you're fine.
If the trail does not follow behind and stays in set orientation, either modify particle effect so it follows behind or you'll need to modify some code to get it working.
Looking at ProjectileMoveScript.cs, I think adding:
transform.localScale = new Vector3(transform.localScale.x * -mirror, transform.localScale.y, transform.localScale.z);
// below line is in case angled projectiles don't mirror correctly
transform.localEulerAngles = new Vector3(transform.localEulerAngles.x, transform.localEulerAngles.y, transform.localEulerAngles.z * -mirror);
in the Start() method just after the transform.Translate() line should work. But depending on how your projectile is generating its effect, this might not be enough for it to look right. Yours looks to be 2D, so this might work for you. Just make sure the pivot of the projectile object is the middle of the ball part and not the flame part.
EDIT: added line for angled projectiles.
the effect is baked into the sprites...
i cant code btw... this is a hatchet job. lol.
ill have a go at putting it in but i doubt ill be able to... lol.
im on pro not source so cant edit the code it would seem.
Ah, damn. OK, your best bet is to create your projectile as a particle effect that is independent of direction. Look into Unity tutorials on how smoke trails and jet engine boosters are done using the Shuriken particle system, I think that's a good basis to start with and should translate easily to creating basic projectile.
It won't look like your 2D one though, but will work nicely in any direction.
I've updated the mod to consider angled projectiles.
Universal Fighting Engine Forum → UFE 1 (Deprecated) → Projectile Offset Issue
Powered by PunBB, supported by Informer Technologies, Inc.