October 18, 2021, 23:50:06

Author Topic: Adding a backward facing camera  (Read 380 times)

Offline JBR

  • Full Member
  • ***
  • Posts: 143
Adding a backward facing camera
« on: May 10, 2021, 00:19:56 »
Hi,

Have a Camera and thought all I would need to do was point the BackCamera in the opposite direction with AlignToVector. But this messes up the joystick movement all over the place.

Any able to point me in the right direction? (no pun intended :-))

Jim

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: Adding a backward facing camera
« Reply #1 on: May 10, 2021, 08:16:26 »
Code: [Select]
PositionEntity(OtherCamera,entityx(Camera,true),entityy(Camera,true),entityz(Camera,true),true)
RotateEntity(OtherCamera,entitypitch(Camera,true),entityyaw(Camera,true),entityroll(Camera,true),true)
TurnEntity(OtherCamera,0,-180,0)
EntityParent(OtherCamera,Camera,true)
make sure that the parent (in this case 'Camera') is not scaled in any way
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline JBR

  • Full Member
  • ***
  • Posts: 143
Re: Adding a backward facing camera
« Reply #2 on: May 11, 2021, 01:06:48 »
Thanks guys, it's working!

Jim

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal