playMaker

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

blackant

  • Sr. Member
  • ****
  • Posts: 422
  • http://blackantmaster.com
    • View Profile
    • blackantmaster.com
An Action to set a sprite height and rotation
« on: February 22, 2019, 02: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, 02:24:44 AM by blackant »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14316
  • Official Playmaker Support
    • View Profile
Re: An Action to set a sprite height and rotation
« Reply #1 on: March 04, 2019, 10:30:44 PM »
Hi,

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

 Bye.

 Jean

blackant

  • Sr. Member
  • ****
  • Posts: 422
  • http://blackantmaster.com
    • View Profile
    • blackantmaster.com
Re: An Action to set a sprite height and rotation
« Reply #2 on: March 04, 2019, 11:26:26 PM »
no progresse on it, i didn't had time to reopen this project.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14316
  • Official Playmaker Support
    • View Profile
Re: An Action to set a sprite height and rotation
« Reply #3 on: March 27, 2019, 03: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

  • Sr. Member
  • ****
  • Posts: 422
  • http://blackantmaster.com
    • View Profile
    • blackantmaster.com
Re: An Action to set a sprite height and rotation
« Reply #4 on: March 27, 2019, 01: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: 14316
  • Official Playmaker Support
    • View Profile
Re: An Action to set a sprite height and rotation
« Reply #5 on: March 28, 2019, 12: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

  • Sr. Member
  • ****
  • Posts: 422
  • http://blackantmaster.com
    • View Profile
    • blackantmaster.com
Re: An Action to set a sprite height and rotation
« Reply #6 on: April 02, 2019, 09:08:14 AM »
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: 14316
  • Official Playmaker Support
    • View Profile
Re: An Action to set a sprite height and rotation
« Reply #7 on: April 02, 2019, 10:59:06 PM »
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