Announcement

Collapse
No announcement yet.

Shooting to screen touch direction in 2d side scroller

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by KashiKyrios View Post
    You should be careful when you add a float to a vector, as I'm pretty sure that float is added to all three components of the vector, which would make a very different vector.
    If you want to make that vector longer, you should multiply it instead, or add a vector with the components you want.
    Oh thanks a lot . You have really helped me!

    Leave a comment:


  • replied
    You should be careful when you add a float to a vector, as I'm pretty sure that float is added to all three components of the vector, which would make a very different vector.
    If you want to make that vector longer, you should multiply it instead, or add a vector with the components you want.

    Leave a comment:


  • replied
    Ok , I have solved this problem , but I have got another one. Evrething works good untill I'm trying to apply forward vector (red circle on the screen)
    Forward vector does note rotate with 2dVector between onscreen player location and onscreen touch hit location. And this causing not accurate shots and projectile spawning only to the right from player
    Last edited by KAPA6UH; 08-07-2015, 03:59 PM.

    Leave a comment:


  • Shooting to screen touch direction in 2d side scroller

    Hi, gyus I am trying to make 2d character to shoot on screen hit location but I have fail with that. Does anybody have ideas? May be you have tried to make it on your own? There is my non-working logics


    With this my character shooting anywhere but not to the screen touch direction .Can you help me , please?
    Attached Files
Working...
X