playMaker

Author Topic: Scale a cube with mouse  (Read 1602 times)

Kirdissir14

  • Playmaker Newbie
  • *
  • Posts: 12
Scale a cube with mouse
« on: May 13, 2015, 03:56:50 PM »
Hello everyone,

today I purchased Playmaker since I had some trouble with C# (I'm a beginner).
I stumbled across the following problem:

I have several cubes in an empty 3D Space (a plane could be attached in the background). I just have no idea how i could resize those cubes at runtime per mouse drag. I want to grab a corner an they should scale up or down depending on how I move the mouse.

I would be very thankful if someone could give me an advice or just an idea on how I should approach this problem. The camera always faces the cubes from the same side (perspective main camera!). the camera can only move in y and x (so do the cubes).

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Scale a cube with mouse
« Reply #1 on: May 13, 2015, 08:17:47 PM »
Playmaker does let you capture raw mouse movement per axis. If your camera is locked to a plane then you should be able to look up the objects local direction easily. Right would be (1,0,0) and left (-1,0,0). So beginning with item X of a vector 3 direction you could define a way to use your mouse movement based on it's value after you click, hold and drag(I assume) to modify an objects scale.

Kirdissir14

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Scale a cube with mouse
« Reply #2 on: May 14, 2015, 05:38:26 AM »
Thank you for the quick response!
I will try to figure it out and will post the result here