Page MenuHomeFeedback Tracker

InterpolateTo broken 1.27
Assigned, NormalPublic

Description

if you take camera1 and InterpolateTo to another camera2, then the movement in patch 1.27 starts from the zero coordinate, and not from the position of camera1.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Operating System Version
all windows
Category
General
Steps To Reproduce
  1. Read method in Camera class
	\brief Interpolation between camera instances (current camera becomes targetCamera at the end of interpolation)
	\param targetCamera \p to which camera we want to interpolate
	\param time \p true interpolation time
	\param type \p 
		0 = without dynamics
		1 = first half - acceleration, second half deceleration
		2 = first third - acceleration, second third - linear movement, last third - deceleration
	*/
	static proto native void InterpolateTo(Camera targetCamera, float time, int type);
  1. Try to do it:
vector m_Cam_Pos1 = "12418.7 160 12396.3";
vector m_Cam_Pos2 = "11774.3 160 12657.2";
        
cam1 = g_Game.CreateObject("staticcamera", m_Cam_Pos1, true);
cam1.SetPosition(m_Cam_Pos1);
cam1.LookAt(m_Cam_Pos2);

cam2 = g_Game.CreateObject("staticcamera", m_Cam_Pos2, true);
cam2.SetPosition(m_Cam_Pos2);
cam2.LookAt(m_Cam_Pos1);
cam2.SetActive(false);

cam1.SetActive(true);

cam1.InterpolateTo(cam2, 3, 0);

we want to make cam movement from pos1 to pos2, where cam turn around.

  1. we can see that cam1 start movement from 0 0 0 =/
Additional Information

also, please check all changes about Camera.GetCurrentCamera()

it happens that if the camera is set to active, but this method does not return anything, although according to the description it should return the active camera. the camera was previously created like

cam1 = g_Game.CreateObject("staticcamera", m_Cam_Pos2, true);
cam1.SetActive(true);

then, we can delete cam and create new - method return null

Event Timeline

KGB.BEST created this task.Thu, Feb 27, 3:23 PM

Wow! This needs to be fixed.

Fix this error, and the crashes too..

Geez changed the task status from New to Assigned.Thu, Feb 27, 3:38 PM
KGB.BEST edited Additional Information. (Show Details)Thu, Feb 27, 3:39 PM

This needs to be fixed urgently.