playMaker

Author Topic: Character Mouse Look (Top Down Style)  (Read 2931 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Character Mouse Look (Top Down Style)
« on: September 18, 2014, 12:02:07 PM »
It's easy enough to make this with a few actions but I decided it needed to be even easier.

This does a raycast from a camera on a layer mask, then rotates a Rigidbody (Rigidbody.MoveRotation) to look at the point. Most of it is automagic, specify the floor layer and it should just works.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

thebrobotic

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Character Mouse Look (Top Down Style)
« Reply #1 on: March 12, 2015, 10:00:31 PM »
Found this today and love it already, but is it possible to change which axis it rotates in the .cs file? Sorry to bump an old topic but I do like this addon. Thanks!

thebrobotic

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Character Mouse Look (Top Down Style)
« Reply #2 on: March 12, 2015, 10:07:02 PM »
Solved it, I don't know too much C# yet but learning and I blindly changed this line (line 82):

d.z = 0f;

..changed it from d.y, to d.z, and it worked the way I want. Thanks for the awesome addon and sorry to bump an old thread. Thought I might share in case any one else wanted to use it in the way I did.