|
Post by ventus on Jul 3, 2023 9:17:46 GMT
Hello! I'm using invector about month, and asset rly great, thx a lot! I got a situation where i need guide for best way. I'm using free directional tpCamera as base camera for flying ships. I wanna add control for camera locking with simple logic: So, first quetion is: am i choose best way for lock and free camera or may be exist better? I'm thinking about using additional camera state for locking without target but not sure. And second. I make some new camera states with params base on ship class - they have diffrent RotationOffset, min/maxDistance etc. And there i have problem. In my mind scrolling speed must be relative for camera state - diffrent for 40 and 250 maxDistance. Also, when camera locked on ship or target - i wanna see it above tpCamera.mainTarget on y-axis. I try diffrent params of cameraState and heightOffset values in SetLockTarget() but got nothind. I find case for changing tpCamera.offsetMouse.y param from code and it's work fine, but i'm loosing relation for cameraState. In fact not a big problem write extention for tpCamera, but i have idea i'm not first who faced this case. So pls guide me Few img for illustrate my problem №2: 1. How i want 2. Without tuning 3. Trying resolve problem by heightOffset = -80
|
|
|
Post by Invector on Jul 3, 2023 13:08:47 GMT
I'm not sure I understood you problem but have you tried using our LockOn component with a custom state?
|
|
|
Post by ventus on Jul 3, 2023 14:50:16 GMT
Thx for advice, seems like it better way for target lock and can solve my 2nd problem, going to try For first part of problem. I have 2 cameraStates: - cruiser, with minDistance=150 and maxDistance=250 - boat, with minDistance=30 and maxDistance=60 I want zooming in cruiser state be faster then in boat state, but scrollSpeed is param of tpCamera, not cameraState. My current solution is change scrollSpeed in tpCamera from script when changing camera state, but i think - may be i can do it without scripting, just by using some standart components or something about?
|
|
|
Post by Invector on Jul 5, 2023 14:26:09 GMT
You can either modify the scroll to be in the CameraState or create a publich method to set the scroll speed using events or a custom call
|
|