playMaker

Author Topic: Scroll view like touchscreen  (Read 3288 times)

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Scroll view like touchscreen
« on: August 29, 2011, 10:27:09 PM »
Hey there, I have a very simple scene setup (camera and plane). I am looking at a plane with a high res texture on it. I'd like to have functionality so that I can zoom in by the mouse scroll wheel and 'grab' the plane by left clicking and moving in any direction (x,z)

I've been fooling around with a bunch of nodes but haven't come close to getting it right.

Can someone that has more experience with PM suggest a framework for the movement?

Thanks!

EDIT, I have made the basic zoom functionality with iTween - moveBy and using F5/F6 as stand-ins for the scroll/wheel. The get key presets don't include scroll-wheel, any ideas?

« Last Edit: August 29, 2011, 11:51:34 PM by kinetiknz »

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Scroll view like touchscreen
« Reply #1 on: August 30, 2011, 06:58:40 AM »
If you use Get Axis then you can use the Mouse ScrollWheel in the Axis Name slot.

The specs for that Axis are set up in the Game Input section.

It gives you a kind of per frame value based on how fast you scroll the scroll wheel that can be used to modify values.

Q

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Re: Scroll view like touchscreen
« Reply #2 on: August 30, 2011, 09:13:21 PM »
Great Thanks! It's now working fine, get axis -> Float compare, linked to a ZoomIn and ZoomOut setup. I'm starting to get the hang of PM now. Lovin it!

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Scroll view like touchscreen
« Reply #3 on: August 30, 2011, 09:15:07 PM »
Cool!