playMaker

Author Topic: An Action to set a sprite height and rotation  (Read 2851 times)

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
An Action to set a sprite height and rotation
« on: February 22, 2019, 04:22:45 AM »
Hello,

i started creating an action that would allow us to resize a sprite between 2 points.

i use it to let the player see the first clic with right mouse bouton, and the distance with actual mouse.x position to rotate the camera.

the script is actually not completed and i would like to have some help from more advanced people to make something great.

on the screenshot you may see the debug line in the scene view, wich is the desired result of course, and the game view has some problems with angle and sprite size must have height of 10 to get the right scale on Y.

i have attached the script if someone can complete it or help with advises.
« Last Edit: February 22, 2019, 04:24:44 AM by blackant »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: An Action to set a sprite height and rotation
« Reply #1 on: March 05, 2019, 12:30:44 AM »
Hi,

 did you make some progress on this or are you still stuck?

 Bye.

 Jean

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: An Action to set a sprite height and rotation
« Reply #2 on: March 05, 2019, 01:26:26 AM »
no progresse on it, i didn't had time to reopen this project.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: An Action to set a sprite height and rotation
« Reply #3 on: March 27, 2019, 06:04:00 AM »
Hi,

Ok, so I made two new actions to get and set sprite sizes, and I also made a quick scene to show how to control the sprite to have it move, rotated and sized properly between two points.


 Let me know if you have questions.

Bye,

 Jean

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: An Action to set a sprite height and rotation
« Reply #4 on: March 27, 2019, 04:57:46 PM »
Thanks Jean,

i tested but it looks bumpy when you make quick moves.
i'll try to find a smoother way to get accurate result.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: An Action to set a sprite height and rotation
« Reply #5 on: March 28, 2019, 03:26:09 AM »
Hi,

 yep, that's why they made the line renderer, because 2d sprites are not aliased, you can alias it but only with post processing.

 Bye,

 Jean

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: An Action to set a sprite height and rotation
« Reply #6 on: April 02, 2019, 12:08:14 PM »
i mean jiggly when you move the spot fast or not

or maybe it's a bug on my version

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: An Action to set a sprite height and rotation
« Reply #7 on: April 03, 2019, 01:59:06 AM »
Hi,

 yes, that's what I meant, 2d sprites are not alias like 3d object, you need a post processing effect, else you need to use a different technic.

 Bye,

 Jean