View Issue Details

IDProjectCategoryView StatusLast Update
0009500Multi Theft Auto : San AndreasScriptingpublic2016-12-21 05:43
ReporterAfterAll14Assigned Toccw 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformMTA:SAOSwindowsOS Version7
Product Version1.5.3 
Target Version1.5.4Fixed in Version1.5.4 
Summary0009500: attachElements doesn't work for camera in non-zero dimensions
Description

attachElements(getCamera(), someVehicle, x, y, z) returns "false" in any dimension except 0.

Steps To Reproduce

You can reproduce it using runcode:

  1. SERVERSIDE
    me=getPlayerFromName("your name")
    vehicle=getPedOccupiedVehicle(me)
    setElementDimension(me, 1)
    setElementDimension(vehicle, 1)
  2. CLIENTSIDE
    vehicle=getPedOccupiedVehicle(localPlayer)
    success=attachElements(getCamera(), vehicle, 0, -10, 1) --> return false
Additional Information

attachElements is the only way to make properly-working custom cameras for vehicles. (setCameraMatrix and setElementMatrix will result in camera flickering).
I personally need this to make cameras for the new vehicle physics I'm working on atm (cause standart camera behavior is bugged when I replace car physics).
New physics:
https://www.youtube.com/watch?v=39dTwzF11qY
Camera bug:
https://www.youtube.com/watch?v=jIp0RjDiueg

TagsNo tags attached.

Activities

arranTuna

2016-12-20 17:12

manager   ~~0025512

I tried it and it returned false, then I tried it in dimension 0 and it also returned false.

I then tried localPlayer instead of vehicle in attachElements and it works, is this actually a feature request to make camera attachable to a vehicle?

StifflersMom

2016-12-20 23:13

updater   ~~0025520

v1.5.3-release-10966
Executing client-side command: test=getPedOccupiedVehicle(localPlayer)
Command executed!
Executing client-side command: attachElements(getCamera(),test,0,10,1)
Command results: true [boolean]

It works in dimension 0 as described by AfterAll14
If it works in dimension 0, it should work in every dimension :)

AfterAll14

2016-12-21 01:19

viewer   ~~0025522

arranTuna, make sure you follow steps I described in "Steps to reproduce". You have to set dimensions server-side only, cause setting it client-side causes some bugs. I wasn't able to attach camera to localPlayer by doing it in correct order.
As for you question - I just want to be able attach camera to vehicle (and any other element) in non-zero dimensions. Idk if this missing feature or a bug.

ccw

2016-12-21 01:34

administrator   ~~0025523

Fixed in https://github.com/multitheftauto/mtasa-blue/commit/b04291b8c7a0caa937efbd9fda70843b91dcaab8

AfterAll14

2016-12-21 05:43

viewer   ~~0025524

Nice, thanks!

Issue History

Date Modified Username Field Change