Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Gideros 2019.12 released - Page 3 — Gideros Forum

Gideros 2019.12 released

13»

Comments

  • hgy29 said:


    3° Changing it to (atan2(x,y)+180°) as suggested by @oleg gives incorrect results

    I'm not suggesting the formula you indicated
    magneticHeading = (math.atan2(fx, fy) + math.pi) * (180 / math.pi);
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    @oleg, that's what I wrote, except that I reasonned in degrees and not in radians (and assuming my atan2 includes the conversion to degrees)
  • @hgy29
    ps//
    My formula shows the correct results even without the calibration of the magnetic sensors, the compasses available in the store without the calibration show the wrong result
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    edited January 2020
    oleg said:

    @hgy29
    ps//
    My formula shows the correct results even without the calibration of the magnetic sensors, the compasses available in the store without the calibration show the wrong result

    I do get what you say, but lets face it: if apps on the store gives incorrect results for you, then it is probably your phone that has a non commonly placed sensor... I don't want to offend, but do you have another phone to check ?
  • hgy29 said:

    oleg said:

    @hgy29
    ps//
    My formula shows the correct results even without the calibration of the magnetic sensors, the compasses available in the store without the calibration show the wrong result

    I do get what you say, but lets face it: if apps on the store gives incorrect results for you, then it is probably your phone that has a non commonly placed sensor... I don't want to offend, but do you have another phone to check ?
    I checked on 5 devices

    The apps in the store give the right result, but before using the apps you need to rotate the phone to calibrate the sensor

    I have a tablet from google, I doubt that the sensor is non-standard

    I also checked on third-party devices (samsung,lg)- everything works the same

    On the phone from lenovo - does not work because there are no magnetic sensors there
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • SinisterSoftSinisterSoft Maintainer
    edited January 2020
    I checked the Gideros compass example code against the 'built-in' Samsung app on my phone - same results. BUT, if I put the phone vertical the Samsung app stays accurate but the Gideros app flips 180 degrees.

    (this has apparently been fixed in a newer version of Gideros, will be able to check tomorrow I think when @hgy29 gives me the apk).

    Likes: MoKaLux

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • olegoleg Member
    edited January 2020

    I checked the Gideros compass example code against the 'built-in' Samsung app on my phone - same results. BUT, if I put the phone vertical the Samsung app stays accurate but the Gideros app flips 180 degrees.

    (this has apparently been fixed in a newer version of Gideros, will be able to check tomorrow I think when @hgy29 gives me the apk).

    in the example of gyderos there are 2 errors

    Replace the example code with this one and check on the player with the screen rotate automatically
    Be sure to turn off GPS
    application:setKeepAwake(true)
     
    function content() -- реальні розміри видимого екрана scrX центр centrX, і координати видимості сторін minX
    	minX,minY,maxX,maxY=application:getLogicalBounds()
    	minY=minY--+200 --1
    	maxY=maxY---200 --1
    	centrX =application:getContentWidth()/2
    	centrY =application:getContentHeight()/2
    	scrX=(minX-maxX)*-1
    	scrY=(minY-maxY)*-1
     
     
    end
    content()
    ------------------------------------------------------------------
    local arr2=Bitmap.new(Texture.new("compass-pointer.png"))
    	arr2:setAnchorPoint(0.5,0.5)
    	arr2:setPosition(centrX,centrY)
    	stage:addChild(arr2)
    	-----------------------------------------------------
    geolocation = Geolocation.new()
    local function onHeadingUpdate(event)
     
    	--print(math.floor(event.magneticX),math.floor(event.magneticY),math.floor(event.magneticZ))
    	fx=event.magneticX
    	fy=event.magneticY
    	fz=event.magneticZ
     
    	 magneticHeading = (math.atan2(fx, fy) + math.pi) * (180 / math.pi);
     
    	arr2:setRotation(magneticHeading)
    end
     
    geolocation:addEventListener(Event.HEADING_UPDATE, onHeadingUpdate)
    geolocation:startUpdatingHeading(magneticHeading)
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • @oleg I'll do that if the new apk given by @hgy29 doesn't work - downloading it this morning.

    Likes: oleg

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • olegoleg Member
    edited January 2020

    @oleg I'll do that if the new apk given by @hgy29 doesn't work - downloading it this morning.

    Also if it is not difficult for you, check to compare these 3 formulas on your device
    fx=event.magneticX
    	fy=event.magneticY
    	fz=event.magneticZ
     
    	 magneticHeading = (math.atan2(fx, fy) + math.pi) * (180 / math.pi);
    	 magneticHeading2 = (math.atan2(fx, fy)) * (180 / math.pi);
    magneticHeading3 = (math.atan2(fx, -fy) + math.pi) * (180 / math.pi);

    I plan to use the compass as a joystick along with an accelerometer. So GPS is not suitable for me, but I need stable determination of the deviation of the phone from the magnetic pole.
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • MoKaLuxMoKaLux Member
    edited January 2020
    are macros still working for you?
    when I type this simple macro gideros complains!
    PLAYER @ 1
    BOX @ 2
    Weird >:)
    EDIT: PLAYER seems to be reserved, I changed to PLAYER1, all good :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • i tried to export my app for html5 and it gives the error:
    "falling back to ArrayBuffer instantiation"
  • hgy29hgy29 Maintainer
    @keszegh, enable compression and it should work.

    Likes: keszegh

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited February 2020
    in gideros installation folder \Library\3dbase wouldn't it be better to replace 3DObjLoader.lua (5kb) by objloader.lua (9kb). I don't seem to make 3DObjLoader.lua work for obj. objloader.lua works great.
    lua
    lua
    objloader.lua
    9K
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLux said:

    in gideros installation folder \Library\3dbase wouldn't it be better to replace 3DObjLoader.lua (5kb) by objloader.lua (9kb). I don't seem do make 3DObjLoader.lua work for obj. objloader.lua works great.

    I see gideros 2020.02 is coming :) could you please comment on the above? Thank you.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Yes, I will compare both to be sure though
  • hgy29hgy29 Maintainer
    Ok, I checked both version, and it appears that 3DObjLoader is actually much more advanced than objloader.lua, but they don't have the exact same API
  • MoKaLuxMoKaLux Member
    edited February 2020
    I think you mean the opposite: objloader.lua is actually much more advanced than 3DObjLoader ? For me objloader.lua works fine even with reactphysics3d. I tried to push it on github but I couldn't find the library folder!
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    No, I really mean 3DObjLoader is better: it handles polygon surfaces (not just triangle). It is lower in size because most of the work is now shared across multiple importers. It lacks a few texture options though, I can add them.
  • ok I will try it again then! when I do:
    -- an object
    --local patrick = loadObj("3d_objs/Patrick Star", "patrick.obj", "3d_objs/Patrick Star/Tex_0086_2.png")
    local patrick = loadObj("3d_objs/Patrick Star", "patrick.obj")
    I have this error:
    stack traceback:
    3dbase/3DObjLoader.lua:54: in function 'parsemtl'
    3dbase/3DObjLoader.lua:147: in function 'importObj'
    3dbase/3DObjLoader.lua:160: in function 'loadObj'

    zip
    zip
    r3d_ball.zip
    109K
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Ok, I see, I will fix that. meanwhile, just add an empty string parameter to the call of importObj near the end of 3DObjLoader.lua:
    local root,mtls=importObj(path,file,imtls,"")

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • thank you captain o:) .
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.