You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while (b.method("MoveNext").invoke()) {
let pos: Il2Cpp.Object = b.method("get_Current").invoke().method("get_MechHeadTransform").invoke().method("get_position").invoke(); //
let ray = this.field("gunCamera").value.method("ScreenPointToRay", 1).overload("UnityEngine.Vector3").invoke(asc.class("SupportAimController").method("get_CenterOfScreen").invoke());
let screenpoint = this.field("gunCamera").value.method("WorldToScreenPoint", 1).overload("UnityEngine.Vector3").invoke(pos);
//jlog(asc.class("SupportAimController").method("get_CenterOfScreen").invoke().type)
// here is raycast
let _st = Il2Cpp.domain.assembly("UnityEngine.PhysicsModule").image.class("UnityEngine.RaycastHit");
let res = new Il2Cpp.Reference(Memory.alloc(Process.pointerSize).writePointer(_st.handle), _st.type);
let rayres = Il2Cpp.domain.assembly("UnityEngine.PhysicsModule").image.class("UnityEngine.Physics").method("Raycast", 2).overload("UnityEngine.Ray", "out UnityEngine.RaycastHit").invoke(ray, res.handle)
//jlog(res.value.method("get_collider").invoke())
//jlog(screenpoint)
let dist = _Vector3.method("Distance").invoke(pos, ray.method("GetPoint", 1).invoke(_Vector3.method("Distance").invoke(pos, my_pos)))
jlog(dist, b.method("get_Current").invoke().field("nickLabel").value.method("get_text").invoke())
//this.field("myCameraContainer").value.method("LookAt").invoke(b.method("get_Current").invoke().method("get_MechHeadTransform").invoke())
}
The text was updated successfully, but these errors were encountered:
justqstn
changed the title
got crash when call method Physics.Raycast
got crash when i pass reference arguments
Apr 11, 2024
pc windows 10
game - pixel gun 3d
i pasted this code into update function
code
The text was updated successfully, but these errors were encountered: