camera direction

kadun

New Member
Reaction score
1
How do i make the camere view looks so it like over the head

like this if you can see what i mean
camera.png
 

Parsival

Active Member
Reaction score
6
Hi,

My idea:

Code:
Variables:

Distance - variable of type 'real'
Temp_Point - variable of type 'point'
Dummy - variable of type 'unit'
CAMERA - camera made in 'camera palette' in WE
DUMMY_UNIT - type of unit
HERO - this funny guy from Your Paint drawing

Trigger:
  • Trigger #1
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set Distance = 100
      • Set Temp_Point = ((Position of HERO) offset by Distance towards (Facing of (HERO)) degrees)
      • Unit - Create 1 DUMMY_UNIT for Player(Red) at Temp_Point facing default orientation degrees
      • Set Dummy = Last created unit
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Camera - Apply CAMERA for Player(Red) over 0.00 seconds
      • Camera - Lock camera target for Player(Red) to Dummy, offset by (0.00, 0.00) using default rotation


Trigger:
  • Trigger #2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Point = ((Position of HERO) offset by Distance towards (Facing of (HERO)) degrees)
      • Unit - Move Dummy instantly to Temp_Point
      • Custom script: call RemoveLocation (udg_Temp_Point)


Made from scratch (for You <3).

You just need to adjust 'Distance' variable to model of your 'HERO'.


I can make it multiplayer-friendly if You want. Just tell me.

Good luck! :)
 

tommerbob

Minecraft. :D
Reaction score
110
Hi,

My idea:

Code:
Variables:

Distance - variable of type 'real'
Temp_Point - variable of type 'point'
DUMMY_UNIT - type of unit
HERO - this funny guy from Your Paint drawing

Trigger:
  • Events
    • Map Initialization
    • Conditions
    • Actions
      • Set Distance = 100
      • Set Temp_Point = ((Position of HERO) offset by Distance towards (Facing of (HERO)) degrees)
      • Unit - Create 1 DUMMY_UNIT for Player(Red) at Temp_Point facing default orientation degrees
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Camera - Lock camera target for Player(Red) to (DUMMY_UNIT), offset by (0.00, 0.00) using default rotation


Trigger:
  • Events
    • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Point = ((Position of HERO) offset by Distance towards (Facing of (HERO)) degrees)
      • Unit - Move (DUMMY_UNIT) instantly to Temp_Point
      • Custom script: call RemoveLocation (udg_Temp_Point)


Made from scratch (for You :*).

You just need to adjust 'Distance' variable to model of your 'HERO'.
It should work fine IMO.

You can do this without needing a dummy unit. I have a camera that does this exact thing in one of my maps. I'm not at home at the moment or I would post it. If you'd like, I can post it later on when I get home.
 

Parsival

Active Member
Reaction score
6
You can do this without needing a dummy unit. I have a camera that does this exact thing in one of my maps. I'm not at home at the moment or I would post it. If you'd like, I can post it later on when I get home.
Thanks for wasting ~20 minutes of my life! :( ;)

You change position of camera every time, right?
 

kadun

New Member
Reaction score
1
each time he turn the camera rotates with him (the hero)

and it's a multiplayer map ofc :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top