0

Side scrolling shooter: shooting issue

Dornano 2 weeks ago in Shooter updated 20 hours ago 5

Hi !

I'm trying to make a side scrolling twin stick shooter with a character aiming around him (like the thief character in Trine for example)

My weapon acts like the Shooter module's Grenade (not straight forward ammo, but using a curve).

But 1) I can't see the Trajectory line, even though I set up the prefab coming with the module, and 2) I can't shoot, even though I set up an input trigger.

Any ideas?

Unity version:
2019.4.9f1
Game Creator version:
1.1.9

Because it's a shooter game, I have an On Start trigger which draw and aim weapon.

When I replace my custom weapon by the Grenade weapon made by GC, it doesn't shoot neither.

And when I play the demo scene, the grenade works well, sure, but if I set up a side scrolling input type and aiming type with follow camera, the trajectory line and the grenade goes far in the Z axis :/

2020-09-10 13-42-28.mp4

If I may add something, I think there is also an animation issue linked to this problem.

The character is supposed to aim to my cursor direction, but the character shake more and more. When I click to shoot, he shakes more, and when I bring my cursor closer to him, he shakes even more also.

Maybe because my cursor is moving on the Z axis, but I really don't know actually .

Ifigured out I was using a wrong trigger: I should use "On mouse down" and then set the left click, instead of using the "On mouse left down".

But anyway, my trigger is linked to a simple Shoot weapon Action, and the trigger is working well according to a debug message, but the shooting action doesn't launch.

When I set up a On shoot -> debug message inside my Ammo prefab, nothing shows up in the console... :/

I'm sorry for this new post, but I found some solutions I guess. I solved these :


1) I can shoot. I just duplicated the GC side scroll scene example and worked from it.

2) The animation issue I showed in my video was because I added a Rigidbody to my Player.

But there are still these issues:


1) No trajectory line while aiming. (knowing that I use an On Start trigger -> Aiming, so it's aiming all the times)

2) When I shoot, my projectile is a GC Character. But there is no force applied to him. He just go down like this :

2020-09-15 17-13-27.mp4

I added a rigidbody to the Character, but I see no difference... (and when I do that, I get the animation issue mentioned above anyway) :/


It was such a fight to finally make my Character be shot correctly, but I managed to do it.
The only remaining thing is... no trajectory line while aiming ^^;